25:00
Lukas Lehner and Maximilian Trenkmann
2023-01-12
Automatable reports
Version control
Dissemination and academic websites
Containerisation for reproducible environments
Encryption and advanced programming
Source: illustrations by @allison_horst
You all have used version control previously:
Git is a sophisticated form of version control. Git…
Source: illustrations by @allison_horst
Source: illustrations by @allison_horst
Source: illustrations by @allison_horst
Source: illustrations by @allison_horst
Source: illustrations by @allison_horst
25:00
Generally, git operates through a shell. (Later on, we will install a GUI can make life easier.)
A shell (or terminal) is a program on your computer whose job is to run other programs, rather than do calculations itself.
Let’s start open the shell in In RStudio: Tools > Shell.
A note for Windows users: the default Windows shell does not support git commands. However, we can solve this by installing GitBash - a light shell that does support git commands.
Basic shell commands: https://cfss.uchicago.edu/setup/shell/
Git is the command line version control system (VCS) software, which works on your local computer.
GitHub is an internet hosting service for git repositories.
GitHub Desktop is an application that enables you to interact with GitHub using a GUI instead of the command line or a web browser.
## Pro Tip
Do not create a Git repo inside your Git repo
Git repos are not supposed to go into Google Drive, DropBox, or OneDrive, but…
Resetting
Sharing code publicly can be very useful but poses some challenges. To avoid security issues or problems for you and other users consider the following tipps.
Start a new git repository and copy paste your code when you publish. You might have information in your git history you don’t want to share (passwords, private access tokens, “unprofessional” text or code from the early days of a project)
Add a “Usage” and “Contributing” section to your README.md
20:00
Push rejected. This can happen if you have changes on the remote and on your local repo. > - Solution: Pull first. Resolve the conflict. Then try your push again.
fatal: not a git repository. The command cannot be executed because the current directory is not a Git directory. > - Solution: initialize the repo or change directory to the repo
Commit early and often.
Push to your remote on GitHub often (but not as often as you commit).
Establish a naming convention for commits.
Use tags to mark key steps.
Fork and clone from foreign repos (instead of “just cloning”)
Branch of your development version, especially in teams.
Source: illustrations by @allison_horst
20:00
Tools for Efficient Workflows